<template>
  <div class="homeWeekend">
        <div class="weekend-title">周末去哪儿</div>
        <ul>
            <li class="weekend-item" v-for="item in recomondList" :key="item.id"> 
                <div class="weekend-item-img-wrapper">
                    <img class="weekend-item-img" :src="item.imgUrl">
                </div>
                <div class="weekend-item-info">
                    <p class="weekend-item-title weekend-item-ellipsis">{{item.title}}</p>
                    <p class="weekend-item-review">{{item.review}}</p>

                </div>

            </li>
        </ul>
      
  </div>
</template>
<script>
export default {
  name: "homeWeekend",
  data() {
    return {
       recomondList:[
           {
               id:'01',
               imgUrl:'http://img1.qunarzz.com/sight/source/1811/f3/86173f863bef61.jpg_r_640x214_52b003ac.jpg',
               title:'水奥雪世界',
               review:'79条评论'
           },
            {
               id:'02',
               imgUrl:'http://img1.qunarzz.com/sight/source/1505/aa/7baaf8a851d221.jpg_r_640x214_1431200f.jpg',
               title:'南山滑雪场',
               review:'1454条评论'
           },
            {
               id:'03',
               imgUrl:'http://img1.qunarzz.com/sight/source/1811/7e/476589267ebb41.jpg_r_640x214_bf599709.jpg',
               title:'南山滑雪场',
               review:'1454条评论'
           }
       ]
    };
  },

};
</script>

<style scoped>
.weekend-title{
    height: .8rem;
    padding-left: .26rem;
    line-height: .8rem;
    color: #212121;
    background: #eee ;
}
.weekend-item{
    width: 100%;
    /* display: flex; */
    height: 0;
    overflow: hidden;
    padding-bottom: 54.5%;
}

.weekend-item-img-wrapper img{
    width: 100%;
}
.weekend-item-info{
    overflow: hidden;
    /* padding-left: .22rem; */
    /* min-width: 0; */
}
.weekend-item-title {
    margin-top: .26rem;
    height: .44rem;
    color: #212121;
    font-size: .32rem;
    line-height: .44rem;
}
.weekend-item-ellipsis{
    overflow: hidden;
    width: 100%;
    /* 超出的字。。。代替 */
    white-space: nowrap;
    text-overflow: ellipsis;
}
.weekend-item-review{
    margin-top: .14rem;
    height: .34rem;
    color: #616161;
    font-size: .24rem;
    line-height: .34rem;
    vertical-align: text-bottom;
}
.weekend-item-price{
    color: #ff8300;
    font-size: .24rem;
    line-height: .4rem;
    position: relative;
    margin-top: .22rem;
    font-size: .24rem;
    line-height: .4rem;
}
</style>